﻿@model IEnumerable<TO.Model.Transaction>
@{
    ViewBag.Title = "Lista de Transações";
}

<h2>TransactionList</h2>

<p>
    @Html.ActionLink("Nova Transação", "TransactionCreate")
</p>
<table>
    <thead>
        <tr>
            <th>ID</th>
            <th>Nome</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>@Html.DisplayFor(id => item.ID)</td>
                <td>@Html.DisplayFor(name => item.Name)</td>
                <td>
                    @Html.ActionLink("Alterar", "TransactionEdit", new { id = item.ID }) |
                    @Html.ActionLink("Excluir", "TransactionDelete", new { id = item.ID })
                </td>
            </tr>
        }
    </tbody>
</table>
